// ducks模式代码

// 常量  types.TEST_TICKET  import { types } from ''
export const types = {
  TEST_TICKET: "TEST_TICKET"
}

// actionCreators // 生成对象 { type: '',data }
export const actions = {
  getTestAction() {
    return {
      type: types.TEST_TICKET
    }
  },
  testThunk() {
    // return (dispatch, getState) => {
    //   // 异步 代码  ajax
    // }
  }
}

// reducer
const defaultState = {
}
export default (state = defaultState, action: any) => {
  switch (action.type) {
    case types.TEST_TICKET:
      return { ...state }
    case types.TEST_TICKET:
      return { ...state }
    default:
      return { ...state }
  }
}


